package com.ruoyi.hire.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hire.mapper.HireNoticeMapper;
import com.ruoyi.hire.domain.HireNotice;
import com.ruoyi.hire.service.IHireNoticeService;

import javax.annotation.Resource;

/**
 * 招聘启事管理Service业务层处理
 *
 * @author linyang
 * @date 2025-07-21
 */
@Service
public class HireNoticeServiceImpl implements IHireNoticeService {


    @Resource
    private HireNoticeMapper hireNoticeMapper;

    /**
     * 查询招聘启事管理
     *
     * @param id 招聘启事管理主键
     * @return 招聘启事管理
     */
    @Override
    public HireNotice selectHireNoticeById(Long id) {
        return hireNoticeMapper.selectHireNoticeById(id);
    }

    /**
     * 查询招聘启事管理列表
     *
     * @param hireNotice 招聘启事管理
     * @return 招聘启事管理
     */
    @Override
    public List<HireNotice> selectHireNoticeList(HireNotice hireNotice) {
        return hireNoticeMapper.selectHireNoticeList(hireNotice);
    }

    /**
     * 新增招聘启事管理
     *
     * @param hireNotice 招聘启事管理
     * @return 结果
     */
    @Override
    public int insertHireNotice(HireNotice hireNotice) {
        return hireNoticeMapper.insertHireNotice(hireNotice);
    }

    /**
     * 修改招聘启事管理
     *
     * @param hireNotice 招聘启事管理
     * @return 结果
     */
    @Override
    public int updateHireNotice(HireNotice hireNotice) {
        hireNotice.setUpdateTime(DateUtils.getNowDate());
        return hireNoticeMapper.updateHireNotice(hireNotice);
    }

    /**
     * 批量删除招聘启事管理
     *
     * @param ids 需要删除的招聘启事管理主键
     * @return 结果
     */
    @Override
    public int deleteHireNoticeByIds(Long[] ids) {
        return hireNoticeMapper.deleteHireNoticeByIds(ids);
    }

    /**
     * 删除招聘启事管理信息
     *
     * @param id 招聘启事管理主键
     * @return 结果
     */
    @Override
    public int deleteHireNoticeById(Long id) {
        return hireNoticeMapper.deleteHireNoticeById(id);
    }
}
